<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link type="text/css" rel="stylesheet" href="../css/bootstrap.min.css" />
    <link type="text/css" rel="stylesheet" href="../css/bootstrap-theme.min.css" />

    <script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap.min.js"></script>

    <style type="text/css">
        .carousel {
            width: 525px;
            height: 525px;
        }

        .item img {
            width: 525px;
            height: 525px;
        }
        table{
            border: 1px solid orange;
            width: 500px;
            margin: 5px auto;
            text-align: center;
            border-collapse: collapse;
        }
    </style>
    <title>Title</title>
</head>
<body>
<form class="form-horizontal" action="login">
<div class="form-group">
    <label  class="col-sm-2 control-label">账号:</label>
    <div class="col-sm-10">
        <input type="email" class="form-control" id="inputEmail3" placeholder="Email">
    </div>
</div>
<div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">密码:</label>
    <div class="col-sm-10">
        <input type="password" class="form-control" id="inputPassword3" placeholder="Password">
    </div>

</div>
    </div>
    <div class="form-group">
        <label for="inputPassword3" class="col-sm-2 control-label">验证码:</label>
        <div class="col-sm-10">
            <input type="password" class="form-control" id="inputPassword4"  name="code">
        </div>
    </div>
    <img src="validatecode" alt="">
    <div class="form-group">

        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-default">登录</button>
        </div>

    </div>
<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">

    </div>
</div>
<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
        <button type="button" class="btn btn-default">看不清</button>
    </div>
</div>
</form>
<script>
    var btn = document.querySelector("button");
    var codeImg = document.querySelector("img");
    btn.onclick=function () {
        codeImg.src="validatecode?n="+Math.random();
    }
</script>

</body>
</html>